<?php

use yii\helpers\Html;
use yii\grid\GridView;

/* @var $this yii\web\View */
/* @var $searchModel app\models\searchs\ParkSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = '园区列表';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="park-index">

    <h1><?= Html::encode($this->title) ?></h1>
    <?php // echo $this->render('_search', ['model' => $searchModel]); ?>

    <p>
        <?= Html::a('新增园区', ['create'], ['class' => 'btn btn-success']) ?>
    </p>

    <?= GridView::widget([
        'dataProvider' => $dataProvider,
        'filterModel' => $searchModel,
        'columns' => [
            ['class' => 'yii\grid\SerialColumn'],
            //'id',

            [
                'attribute'=>'code',
                'value'=>'code',
                'headerOptions' => ['width' => '150'],
            ],
            'name',
            [
                'label'=>'所属公司',
                'attribute'=>'cname',
                'value'=>'company.name',
            ],
            'addr',
            //'scale',
            // 'build_date',
            // 'start_date',
            // 'introduction:ntext',
            // 'tel',
            // 'email:email',
            // 'comment',
            // 'map_image',
            // 'qualification_image',
            // 'pricipal_id',
            // 'company_id',
            // 'contact_id',

            ['class' => 'yii\grid\ActionColumn'],
          
        ],
        //'layout' => '{summary}{items}{pager}',
    ]); ?>

</div>
